/**
 * Created by Administrator on 2017/8/3.
 */
import Vue from 'vue'
import Router from 'vue-router'
import store from '../../vuex/store'
import axios from '../../axios/http'
import YDUI from 'vue-ydui'
import 'vue-ydui/dist/ydui.rem.css'
import '../healths.css'
import '../../../mock/mock.js'

import scanIndex from './scan.vue'
import scanReg from './reg.vue'
import scanPrototcol from './prototcol.vue'
import scanDownload from './download.vue'
import yyScan from './yyscan.vue'

Vue.use(YDUI)
Vue.use(Router)

// 将axios挂载到prototype上，在组件中可以直接使用this.axios访问
Vue.prototype.axios = axios;

const router = new Router({
  hashbang: false, 
  history: true,
  routes: [
    {
      path: '/',
      name: 'scan',
      component: scanIndex
    },{
      path: '/scanreg',
      name: 'scanreg',
      component: scanReg
    },{
      path: '/prototcol',
      name: 'scanprototcol',
      component: scanPrototcol
    },{
      path: '/download',
      name: 'scandownload',
      component: scanDownload
    },{
      path: '/yyscan',
      name: 'yyscan',
      component: yyScan
    }]
})

new Vue({
	el: '#scan',
  router,
	store,
  axios,
	template: '<router-view></router-view>',
	components: { scanIndex	}
})
